<template>
  <el-container>
    <el-aside width="15vw" class="aside" ref="aside">
      <sidebar></sidebar>
    </el-aside>
    <el-main class="main">
      <div class="show-aside" @click="showAside()">
        <div class="show-aside-top"></div>
        <div class="show-aside-bottom"></div>
      </div>
      <router-view></router-view>
    </el-main>
  </el-container>
</template>

<script>
import sidebar from "@/components/sidebar";

export default {
  name: "index",
  components: {sidebar},
  mounted() {
  },
  methods:{
    showAside(){
      this.$refs.aside.$el.style.width === "0px"?
        this.$refs.aside.$el.style.width = "15vw":
        this.$refs.aside.$el.style.width = "0px"
    }
  }
}
</script>

